Copyright: Copyright ® 1995-97 ATTAC Consulting Grp


yesyesyesyesFile Open/Save As Common Dialogsosdlgyesyes08/10/97


Table of Contents

Open, Save As, Browse for File Dialog Code Module

Version 2.8

Flexible, Fast, Functional, Easy to Distribute Dialog Code

(Or why not to use a Common Dialog ActiveX - OLE Control)

Drop In Usability of the Code

How to Register and Obtain a Copy of the Modules

The code contained in the Access database osdlg.mdb is copyright ATTAC Consulting Group, Ann Arbor, MI USA, © 1995-97.  No warranty is provided or implied in publishing this code.  No redistribution, transmittal, or copying of this code in any format, electronic or otherwise is authorized without receipt of a registration and applicable fee by ATTAC Consulting Group.


Help file produced by  HELLLP! v2.3a , a product of Guy Software, on 10/8/97 for Unregistered User.

The above table of contents will be automatically completed and will also provide an excellent cross-reference for context strings and topic titles.  You may leave it as your main table of contents for your help file, or you may create your own and cause it to be displayed instead by using the I button on the toolbar.  This page will not be displayed as a topic.  It is given a context string of _._ and a HelpContextID property of 32517, but these are not presented for jump selection.

HINT:  If you do not wish some of your topics to appear in the table of contents as displayed to your users (you may want them ONLY as PopUps), move the lines with their titles and contexts to below this point.  If you do this remember to move the whole line, not part.  As an alternative, you may wish to set up your own table of contents, see Help under The Structure of a Help File.

  Do not delete any codes in the area above the Table of Contents title, they are used internally by HELLLP!

Registration

Web/Mail


Open/Save As Common Dialogs
 Calling the Windows Dialogs

The Open, Save As and Browse for Folder Dialogs

Most MS® ACCESS applications will call the Open or Save As Common Dialogs, or the Browse for Folder Dialog to gather file specifications for opening or saving a file, outputting a report, finding the path to attach or reattach tables to the database.

Microsoft has published Active X controls for calling the standard common dialogs.  While using such a control may sound easy, relying on controls when you don't have to has a number of negative results:

1.)	Active X controls add a larger memory requirement to your application
2.)	You have to distribute the control with your application, adding to the size of your distribution disks etc. and you have to worry about broken references to the control on the target system
3.)	You loose potential flexibility, because the control designer determines what support is exposed for your use.
4.)	Controls often work with one version of Access but not another, requiring you to maintain a different code bases for each new version of Access.
5.)	The common dialogs Active X control doesn't support the browse for folder dialog.

Its simply faster and more flexible to use straight Visual Basic code for common dialogs or the Browse Dialog.

Code Portability and Long File Names

With the number of versions of Access in use, including 16bit Access 2 and 32bit Access 95 & 97, the developer is faced with multiple platforms an application may be run on.  To lower design and release costs, applications should be convertible between versions.  Common dialog code needs to:

	Support both 16 bit environments (Access 2x) and 32 bit environments (Access 95 & 97)
	Long File Name support when run on Windows 95/98 or Windows NT.  Users running these newer OS systems now want support for long file names when saving documents or files even in Access 2.x.

High Functionality, Easy to Use Code Available

This sample mdb, demonstrates Visual Basic code which is available for developers to add the following functionality to their application for calling the file Open and Save As Common Dialogs, and Browse for Folder Dialog.

Standard file Open and Save As dialogs when an Access 2.x application is run under win3.1x

File Open and Save As dialogs which support Long File Names, when an Access 2.x application is run on either Windows 95 or Windows NT.  And support for the Browse for Folder dialog (You said you need just a directory?) for Access 2.

Code portability between Access 2, Access 95 & 97.  The code will identify the version of Access and the operating system the user is running, and automatically adjust to 16 bit or 32 bit calls.

Three versions of the code are included with your registration, a fully convertible version supporting all versions of Access, a 32 bit only version supporting Access 95 & 97, and a class module supporting Dialog objects for Access 97.

Simple "drop in" implementation.  Import the code into your application and call your dialog with one line of code.  Here's a sample of how easy it is to use.

How to Obtain a copy of the Code:

So stop worrying about using ActiveX controls, or trying to figure out the conversion of the 16 bit to 32 bit application support, we've done it all for you.  Our Dialogs code module is available under either a Shareware license, or for the developer, a Developer's Distribution License.

Here's How to Register to Obtain the code.  Once we receive your registration, we will send you the code via e-mail, as well as implementation tips.


How To Register

Two levels of license available:

	A Shareware Level license allows use of the code in any application(s) or database(s) with a total combined number of users of 5 or less.  Cost for a Shareware License is $15.00 (US)
	A Developer's Application License is available  for developer's needing to use the code in applications or databases with a combined to 6 or more users.  Developer's Application Licenses allow you to use the code in an unlimited number of databases, for any number of users.  Cost for a Developer's Application License is $30.00 (US).

Register via CompuServe (Shareware Licenses only):

CompuServe Members can register On Line in the Shareware Forum

GO "SWReg"

Shareware program ID/registration # = 7097

We will e-mail you the code upon receipt of registration.

Register by Mail (Shareware and Developer's licenses):

1.)  Fill out the Registration Form included in this help file:

2.)  Payment for either level of license may be made by bank check, international money order, or traveler's checks.  We don't currently accept credit cards.  Check our Web site or e-mail us for options on payment methods.

3.)  Send the registration form and payment to ATTAC Consulting Group.  Upon receipt of Registration fees for either a Shareware or Developer's license we will e-mail the code to you.

Registration fees may be mailed to:

ATTAC Consulting Group

2869 Baylis Drive

Ann Arbor, MI  48108-1705 USA

Be sure to include an e-mail address, and version of Access you use so we can send the code.


Examples of Use
Drop In Usability

Using the Standard Code Module

Once you import the code module into your database application here's all it would take to call the file open dialog from your form in Access 2, 95 or 97; the same call is made in each version:

Function GetDataMdb() as String

GetDataMdb = atopenfile(Me.hwnd, "Attach Tables from What Database?", 1, -1, 0)

End Function

Parameter options are discussed in the how to use file which comes with the code and is demonstrated in the sample database

Using the Dialogs Class Module (for Access 97 only)

Creating an Open Dialog is very simple, and easily understandable with the Dialogs Class which is included with the Shareware registration  Here's an example:

Function GetDataMdb() as String

'Used to reattach tables

   Dim MyDlg as New DialogClass

   With MyDlg

      .Title = "Attach Tables from What Database?"

      .TypeFile = 1  'Access mdbs.

      .DialogType = "Open"

   End With

   MyDlg.Show

   GetDataMdb = MyDlg.ReturnValue

End Function


Registration Form

(OSDLG)

With which version of Access you will be using with our Code Module?

Access 2  ___________    Access 95  ___________    Access 97  ___________

Print this form by clicking the Print Button

Name (Required): __________________________________	Phone # (Required for Developer) __________________
Company (Required):_______________________________________

Address (Required)________________________________________________________________________________

                                  Street                            City                         State/Province         Postal Code          Country

E-Mail Address: (Required)_______________________________________________

License Level Desired:

Shareware _____ ($15.00 US)	Developer  _______ ($30.00)
Information we'd like to know if you'd share it with us:

 How did you hear about our Open SaveAs Dialogs?:  OnLine Service ____  Word of Mouth ____ Review ____

Internet  _____ (Please provide the Web site: or Newsgroup _____________________________________)

Other:    _____ (Specify: _____________________________________________)

Operating System:  Windows 95 ____  Windows NT _____  Other ______

Enclose a bank or corporate check the amount specified above and mail to:

ATTAC Consulting Group

2869 Baylis Drive

Ann Arbor, MI  48108-1705  USA

e-mail: 75323.2112@Compuserve.com


Web/Mail

ATTAC Consulting Group

Web:  http://ourworld.compuserve.com/homepages/attac-cg/acgsoft.htm

Email:  75323.2112@Compuserve.com